package com.zq.ssmdemo.config;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class VoResultException {

 
//全局异常处理类
    @ExceptionHandler(Exception.class)
    public String error(Exception e){
        System.err.println(e.getMessage());
    return e.getMessage();
    }
    
}